﻿using System;
using System.Collections.Generic;
using BrightSword.SwissKnife;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Tests.BrightSword.SwissKnife
{
    [TestClass]
    public class TypeGetNameExtensionTests
    {
        [TestMethod]
        public void Given_SimpleType_GetName()
        {
            Assert.AreEqual(
                "Int32",
                typeof (Int32).PrintableName());
        }

        [TestMethod]
        public void Given_GenericTypeOneArgument_GetName()
        {
            Assert.AreEqual(
                "IList<Int32>",
                typeof(IList<Int32>).PrintableName());
        }

        [TestMethod]
        public void Given_GenericTypeMultipleArguments_GetName()
        {
            Assert.AreEqual(
                "IDictionary<Int32, IList<String>>",
                typeof(IDictionary<Int32, IList<String>>).PrintableName());
        }
    }
}